<template></template>

<script>
import api from "@/api/utils";
export default {
  data() {
    return {};
  },
  mounted() {
    this.init();
  },
  methods: {
    async init() {
      let res = await this.$http.post(api.userBind, {
        type: 32,
        code: this.$route.query.code,
        state: this.$route.query.state,
      });
      if (res && res.code == 0) {
        this.$store.commit("SET_PERSONTAB", 1);
        this.$router.push("/personcenter");
      } else {
        this.$message.error(res.msg || this.$t("网络错误"));
        this.$router.push("/");
      }
    },
  },
};
</script>

<style>
</style>